﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DatabaseCreator
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("Creating database schema...");

                var databaseCreator = new DatabaseCreator();
                databaseCreator.CreateSchema();

                Console.WriteLine("");

                Console.WriteLine("Database has been created");

                Console.WriteLine("");

                Console.WriteLine("What do you want to do?");
                Console.WriteLine("1. Create test data");
                Console.WriteLine("2. Create data from Excel sheet (slv.xls)");
                Console.WriteLine("0. Exit");

                Console.WriteLine("");

                string answer = Console.ReadLine();

                switch (answer)
                {
                    case "1":
                        databaseCreator.AddTestData();
                        Console.WriteLine("Test data has been added");
                        break;
                    case "2":
                        databaseCreator.AddDataFromExcelSheet("slv.xls");
                        Console.WriteLine("Excel data has been added");
                        break;
                    case "0":
                        break;
                    default:
                        break;
                }
            }
            finally
            {
                Console.WriteLine("Press any key to exit.");
                Console.ReadLine();
            }
        }


    }
}
